/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.guobo.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.guobo.entity.GrantCard;
import com.thinkgem.jeesite.modules.guobo.dao.GrantCardDao;

/**
 * 授权卡Service
 * @author wudavid
 * @version 2017-05-02
 */
@Service
@Transactional(readOnly = true)
public class GrantCardService extends CrudService<GrantCardDao, GrantCard> {

	public GrantCard get(String id) {
		return super.get(id);
	}
	
	public List<GrantCard> findList(GrantCard grantCard) {
		return super.findList(grantCard);
	}
	
	public Page<GrantCard> findPage(Page<GrantCard> page, GrantCard grantCard) {
		return super.findPage(page, grantCard);
	}
	
	@Transactional(readOnly = false)
	public void save(GrantCard grantCard) {
		if(grantCard.getId()==null || "".equals(grantCard.getId()) || "null".equals(grantCard.getId())){
			grantCard.setStatus("0");
		}		
		super.save(grantCard);
	}
	
	@Transactional(readOnly = false)
	public void delete(GrantCard grantCard) {
		super.delete(grantCard);
	}
	
}